package com.eastfair.venuebooking.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.common.dto.AttachmentFileDTO;
import com.eastfair.venuebooking.dto.*;
import com.eastfair.venuebooking.entity.MaterialDeclaration;
import com.eastfair.venuebooking.vo.ExhibitionMaterialVO;
import com.eastfair.venuebooking.vo.MaterialDeclarationVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 材料申报
 * </p>
 *
 * @author linan
 * @date 2022-06-08
 */
public interface MaterialDeclarationService extends SuperService<MaterialDeclaration> {

    /**
     * 添加申报材料
     * @param materialDeclarationSaveDTO
     * @return
     */
    Long addMaterialDeclaration(MaterialDeclarationDTO materialDeclarationSaveDTO);

    /**
     * 修改申报材料
     * @param materialDeclarationUpdateDTO
     * @return
     */
    boolean updateMaterialDeclaration(MaterialDeclarationDTO materialDeclarationUpdateDTO);

    AttachmentFileDTO deleteOldFile(MaterialDeclarationDTO materialDeclarationUpdateDTO, MaterialDeclaration updateEntity);

    /**
     * 添加展会申报材料
     * @param exhibitionMaterialSaveDTO
     * @return
     */
    Long addExhibitionMaterial(ExhibitionMaterialSaveDTO exhibitionMaterialSaveDTO);

    /**
     * 申报材料列表
     * @param params
     * @return
     */
    IPage<MaterialDeclarationVO> queryMaterialDeclaration(PageParams<MaterialDeclarationQuery> params);

    /**
     * 通过展会id查询材料申报记录
     * @param exhibitionId
     * @param id
     * @return
     */
    List<ExhibitionMaterialVO> queryExhibitionMaterialByExhibitionId(Long exhibitionId, Long id);
}
